package acm.usa1995.southcentral;

import java.util.Scanner;

/*
 * p2020
 * ACM USA South Central 1995
 */

public class p2020 {

	static String str;

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNext()) {
			str = scanner.nextLine();
			if (isPalin(str)) {
				if (isMirrored(str)) {
					System.out.println(str + " -- is a mirrored palindrome.");
				}
				else {
					System.out.println(str + " -- is a regular palindrome.");
				}
			}
			else {
				if (isMirrored(str)) {
					System.out.println(str + " -- is a mirrored string.");	
				}
				else {
					System.out.println(str + " -- is not a palindrome.");
				}
			}
			System.out.println();
		}

	}

	private static boolean isPalin(String s) {
		int len = s.length();
		int i = 0;
		int j = len - 1;
		while (i<=j) {
			if (s.charAt(i) != s.charAt(j)) {
				return false;
			}
			else {
				++i;
				--j;
			}
		}
		return true;
	}

	private static boolean isMirrored(String s) {
		int len = s.length();
		int i = 0;
		int j = len - 1;
		while (i<=j) {
			if (mirror(s.charAt(i)) != s.charAt(j)) {
				return false;
			}
			else {
				++i;
				--j;
			}
		}
		return true;
	}
	
	private static char mirror(char c) {
		/*
 * Character  Reverse  Character  Reverse  Character  Reverse  
    A         A         M         M         Y         Y
    B                   N                   Z         5
    C                   O         O         1         1
    D                   P                   2         S
    E         3         Q                   3         E
    F                   R                   4
    G                   S         2         5         Z
    H         H         T         T         6
    I         I         U         U         7
    J         L         V         V         8         8
    K                   W         W         9
    L         J         X         X
		 */
		switch (c) {
		case 'A': return 'A';
		case 'E': return '3';
		case 'H': return 'H';
		case 'I': return 'I';
		case 'J': return 'L';
		case 'L': return 'J';
		case 'M': return 'M';
		case 'O': return 'O';
		case 'S': return '2';
		case 'T': return 'T';
		case 'U': return 'U';
		case 'V': return 'V';
		case 'W': return 'W';
		case 'X': return 'X';
		case 'Y': return 'Y';
		case 'Z': return '5';
		case '1': return '1';
		case '2': return 'S';
		case '3': return 'E';
		case '5': return 'Z';
		case '8': return '8';
		}
		return ' ';
	}

}
